<?php

// Error reporting.
// NOTE: This should be handled by Core\Main in the future.
error_reporting( E_ALL | E_STRICT );
ini_set( 'display_errors', 'on' );

require "../app/Library/Core/Main.php";

// Autoload classes.
function __autoload ( $strClass ) {
    Core\Main::autoload( $strClass );
}

// Get an instance of Core\Main -- our application.
// NOTE: We only need this to handle errors and exceptions.
$Main = Core\Main::getInstance();


$Generator = new Core\Data\Generator ();
$Generator->addDefinition( $Main->Paths->Definitions . "Helpers/Blacklist.xml" );
$Generator->addDefinition( $Main->Paths->Definitions . "Helpers/Users.xml" ); // Requires Blacklist.xml.
$Generator->generateModels();

$ServerInformation = new Core\Data\SQL\ServerInformation ();
$ServerInformation->Type = Core\Data\SQL\MYSQL;
$ServerInformation->Host = "localhost";
$ServerInformation->Username = "root";
$ServerInformation->Password = "";

$ConnectionEx = new Core\Data\SQL\ConnectionEx ( $ServerInformation );
$Generator->generateDatabases( $ConnectionEx );

$Generator->report();

?>
